//package com.yxl.handler;
//
//import com.yxl.config.MySocketException;
//import io.netty.channel.ChannelHandler;
//import io.netty.channel.ChannelInitializer;
//import io.netty.channel.socket.SocketChannel;
//import io.netty.handler.codec.http.HttpObjectAggregator;
//import io.netty.handler.codec.http.HttpServerCodec;
//import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
//import io.netty.handler.stream.ChunkedWriteHandler;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//
///**
// * @author: yxl
// * @since: 2022-03-27
// **/
//@Slf4j
//@ChannelHandler.Sharable
//public class MyWebSocketChannelHandler extends ChannelInitializer<SocketChannel> {
//
//
//    @Autowired
//    private RegisterHandler registerHandler;
//
//    @Override
//    protected void initChannel(SocketChannel ch) throws Exception {
//        ch.pipeline().addLast("http-codec", new HttpServerCodec())
//                .addLast("aggregator", new HttpObjectAggregator(65536))
//                .addLast("http-chunked", new ChunkedWriteHandler())
//                .addLast("protocolHandler", new WebSocketServerProtocolHandler("/ws"))
////                .addLast("base_handler",)
//                .addLast("register_handler", registerHandler)
////                .addLast("single_message", )
//                .addLast(MySocketException.handler);
//    }
//}
